import Vue from 'vue'
import Router from 'vue-router'
import home from '@/components/tabber/homeContainer'
import goodsCar from '@/components/tabber/goodsCarContainer.vue'
import vip from '@/components/tabber/vipContainer.vue'
import search from '@/components/tabber/searchContainer.vue'
import newlist from '@/components/news/newlist.vue'
import newsinfo from '@/components/news/newsinfo'
import pohotolist from '@/components/pohotos/pohotolist'
import pohotoinfo from '@/components/pohotos/pohotoinfo.vue'
import goodslist from '@/components/goods/goodsList'
import goodsinfo from '@/components/goods/goodsinfo'
import goodsComment from '@/components/goods/goodsComment'
import goodsdesc from '@/components/goods/goodsdesc'
Vue.use(Router)

export default new Router({
    routes: [{
            path: '/',
            redirect: '/home'
        },
        {
            path: '/home',
            component: home
        },
        {
            path: '/goodsCar',
            component: goodsCar
        },
        {
            path: '/vip',
            component: vip
        },
        {
            path: '/search',
            component: search
        },
        {
            path: '/new/newlist',
            component: newlist
        },
        {
            path: '/new/newsinfo/:id',
            component: newsinfo,
            props: true
        },
        {
            path: '/pohotos/pohotoslist',
            component: pohotolist
        },
        {
            path: '/pohotos/pohotoinfo/:id',
            component: pohotoinfo,
            props: true
        },
        {
            path: '/goodslist',
            component: goodslist,
        },
        {
            path: '/pohotos/goodsinfo/:id',
            component: goodsinfo,
            props: true
        },

        {
            path: '/pohotos/goodsComment/:id',
            component: goodsComment,
            name: "goodsComment",
            props: true
        },
        {
            path: '/pohotos/goodsdesc/:id',
            component: goodsdesc,
            props: true
        },

    ]
})